import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    //设置属性，用于保存后台接口返回的权限数据
    permission:[]
  },
  mutations: {
    SET_PERMISSION(state,permission){
      state.permission = permission;
    }
  },
  actions: {
    SET_PERMISSION(context,permission){
      context.commit("SET_PERMISSION",permission)
    }
  },
  modules: {
  }
})
